//
//  UIFont+WXFont.m
//  CommonBusiness
//
//  Created by leev on 2017/11/30.
//  Copyright © 2017年 XES. All rights reserved.
//

#import "UIFont+WXFont.h"

#define IS_OS_9_OR_LATER  ([[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0)

@implementation UIFont (WXFont)

#pragma mark - Public Method

// 平方常规字体
+ (UIFont *)fontPingFangSCWithSize:(CGFloat)fontSize
{
    if (IS_OS_9_OR_LATER)
    {
        return [UIFont fontWithName:@"PingFangSC-Regular" size:fontSize];
    }
    else
    {
        return [UIFont systemFontOfSize:fontSize];
    }
}

// 平方中间字体
+ (UIFont *)fontPingFangSCMediumWithSize:(CGFloat)fontSize
{
    if (IS_OS_9_OR_LATER)
    {
        return [UIFont fontWithName:@"PingFangSC-Medium" size:fontSize];
    }
    else
    {
        return [UIFont boldSystemFontOfSize:fontSize];
    }

}

@end
